<template>
  <view :style="themeColor">
    <view class="page">
      <view class="flex benben-position-layout flex flex-wrap align-center choosepeopleFollow_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex flex-wrap align-center justify-between flex-sub choosepeopleFollow_fd0_0'>
          <view class='flex flex-wrap align-center choosepeopleFollow_fd0_0_c0' @tap.stop="handleJumpDiy"
            data-type="back" data-url="1">
            <text class='fu-iconfont2  choosepeopleFollow_fd0_0_c0_c0'>&#xE794;</text>
          </view>
          <view class='flex flex-wrap align-stretch justify-center'>
            <text class='choosepeopleFollow_fd0_0_c1_c0'>选择</text>
          </view>
          <view class='flex flex-wrap align-center justify-end choosepeopleFollow_fd0_0_c0'>
          </view>
        </view>

      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
      <!---flex布局flex布局开始-->
      <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout choosepeopleFollow_flex_1">
        <view class='flex flex-wrap align-center choosepeopleFollow_fd1_0'>
          <image class='choosepeopleFollow_fd1_0_c0' mode="aspectFit" :src='STATIC_URL+"42.png"'></image>
          <benben-input class='flex-sub' type="text" :placeholder="`搜索`" confirm-type="done" :maxlength="-1"
            placeholder-style="color:rgba(191, 191, 191, 1);font-size:28rpx" v-model="keyworld"
            @confirm='getdataFunc' />
        </view>
      </view>

      <!---flex布局flex布局结束-->
      <!---flex布局flex布局开始-->
      <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout choosepeopleFollow_flex_2">
        <benben-select-diy ref="showSelectPopup1703830202393" class-name='flex flex-direction align-stretch flex'
          :items.sync="dataList" v-model="done_id" default-type="user_id" default-label="user_nickname"
          :allow-cancel='true' type="checkbox" :disabled='false'>
          <template v-for='(item,key0) in dataList'>
            <view v-if="item.isSelected" class='flex align-center justify-between flex choosepeopleFollow_fd2_0_c0'
              :key="key0" @tap="$refs.showSelectPopup1703830202393.tapHandle(key0)">
              <view class='flex flex-wrap align-center'>
                <image class='choosepeopleFollow_fd2_0_c0_c0_c0' mode="aspectFill" :src='item.avatar'></image>
                <view class='flex flex-direction flex-wrap align-start'>
                  <text class='choosepeopleFollow_fd2_0_c0_c0_c1_c0'>{{item.user_nickname}}</text>
                  <view class='flex flex-wrap align-center choosepeopleFollow_fd2_0_c0_c0_c1_c1'>
                    <text class='choosepeopleFollow_fd2_0_c0_c0_c1_c1_c0'>{{item.fans}}</text>
                    <text class='choosepeopleFollow_fd2_0_c0_c0_c1_c1_c0'>粉丝</text>
                    <text class='choosepeopleFollow_fd2_0_c0_c0_c1_c1_c2'>{{item.post}}</text>
                    <text class='choosepeopleFollow_fd2_0_c0_c0_c1_c1_c0'>帖子</text>
                  </view>
                </view>
              </view>
              <image class='choosepeopleFollow_fd2_0_c0_c1' mode="aspectFit" :src='STATIC_URL+"7.png"'></image>
            </view>
            <view v-else class='flex align-center justify-between flex choosepeopleFollow_fd2_0_c0' :key="key0"
              @tap="$refs.showSelectPopup1703830202393.tapHandle(key0)">
              <view class='flex flex-wrap align-center'>
                <image class='choosepeopleFollow_fd2_0_c0_c0_c0' mode="aspectFill" :src='item.avatar'></image>
                <view class='flex flex-direction flex-wrap align-start'>
                  <text class='choosepeopleFollow_fd2_0_c0_c0_c1_c0'>{{item.user_nickname}}</text>
                  <view class='flex flex-wrap align-center choosepeopleFollow_fd2_0_c0_c0_c1_c1'>
                    <text class='choosepeopleFollow_fd2_0_c0_c0_c1_c1_c0'>{{item.fans}}</text>
                    <text class='choosepeopleFollow_fd2_0_c0_c0_c1_c1_c0'>粉丝</text>
                    <text class='choosepeopleFollow_fd2_0_c0_c0_c1_c1_c2'>{{item.post}}</text>
                    <text class='choosepeopleFollow_fd2_0_c0_c0_c1_c1_c0'>帖子</text>
                  </view>
                </view>
              </view>
              <image class='choosepeopleFollow_fd2_0_c0_c1' mode="aspectFit" :src='STATIC_URL+"8.png"'></image>
            </view>
          </template></benben-select-diy>
        <fu-empty-ui v-if="dataList.length==0"></fu-empty-ui>
      </view>

      <!---flex布局flex布局结束-->
      <view class="flex flex-direction flex-wrap align-stretch benben-position-layout flex choosepeopleFollow_flex_3">
        <view class='flex flex-wrap align-center justify-center flex-sub' @tap.stop="submit">
          <button class='choosepeopleFollow_fd3_0_c0'>确定</button>
        </view>

      </view>
      <view :style="{height: '112rpx'}"></view>
      <benben-popup v-model="popupShow1703829582995" :mask="true" :mask-close-able="true" mode='center' :z-index='999'>
        <!---私信成功flex布局开始-->
        <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout choosepeopleFollow_flex_4">
          <view class='flex flex-direction flex-wrap align-stretch choosepeopleFollow_fd4_0'>
            <view class='flex flex-direction flex-wrap align-center choosepeopleFollow_fd4_0_c0'>
              <image class='choosepeopleFollow_fd4_0_c0_c0' mode="aspectFit" :src='STATIC_URL+"51.png"'></image>
              <text class='choosepeopleFollow_fd4_0_c0_c1'>转发成功</text>
              <text class='choosepeopleFollow_fd4_0_c0_c2'>会以系统消息的形式通知到用户</text>
            </view>
            <view class='flex flex-wrap align-center justify-center choosepeopleFollow_fd4_0_c1'
              @tap.stop="handleJumpDiy" data-type="back" :data-url="`1`">
              <text class='choosepeopleFollow_fd4_0_c1_c0'>我知道了</text>
            </view>
          </view>
        </view>

        <!---私信成功flex布局结束-->

      </benben-popup>


    </view>
  </view>
</template>
<script>
  import {
    validate
  } from '@/common/utils/validate.js';
  import pagingList from '@/common/mixin/paging_list.js';

  export default {
    components: {},
    mixins: [pagingList],

    data() {
      return {
        "minixPagingListsApi": "",
        "pageingListApiMethod": "",
        "allowOnloadGetList": false,
        "dataList": [],
        "popupShow1703829582995": false,
        "keyworld": "",
        "doneType": [{
          "name": "李生",
          "value": "1",
          "image": ""
        }, {
          "name": "李不生",
          "value": "2",
          "image": ""
        }],
        "done_id": "",
        currentIndex: ''
      };
    },
    computed: {
      themeColor() {
        return this.$store.getters.themeColor
      },
      isLogin() {
        return this.$store.state.token == '' ? false : true;
      },
      userInfo: {
        get() {
          return this.$store.state.userInfo.userinfo
        },
        set() {
          this.$store.commit('updateUserInfo', value)
        },
      },
    },
    watch: {},
    onLoad(options) {
      if (options.currentIndex) {
        this.currentIndex = options.currentIndex
      }
      this.getdataFunc()
    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {

    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      getdataFunc() {
        this.minixPagingListsApi = global.apiUrls.post657822ba87d30;
        this.pageingListApiMethod = 'post';
        this.allowOnloadGetList = false;
        this.pagingListPostDataContent = {
          user_id: this.userInfo ? this.userInfo.id : '',
          nickname: this.keyworld
        }
        this.listData = [];
        this.dataList = this.listData;
        this.pagingListToggle();

      },
      pagingListPostData() {
        return this.pagingListPostDataContent
      },
      async submit() {
        //请求方法
        //数据验证
        if (!this.done_id) {
          this.$message.info('请选择朋友')
          return
        }
        let datadataInfo = await this.$api.post(global.apiUrls.post65794b08c1bce, {
          user_id: this.done_id,
          // user_id: this.userInfo ? this.userInfo.id : ''
        });

        if (datadataInfo.data.code != 1) {
          this.$message.info(datadataInfo.data.msg);
          return
        }
        let infodataInfo = datadataInfo.data;
        this.popupShow1703829582995 = true
        uni.setStorageSync('currentIndex', this.currentIndex)
      }
    }
  };
</script>
<style lang="scss" scoped>
  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: rgba(255, 255, 255, 1);
    background-size: 100% auto;
  }

  .choosepeopleFollow_flex_0 {
    border-bottom: 1px solid #eee;
    background: #fff;
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .choosepeopleFollow_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 700;
    color: #333333;
    line-height: 50rpx;
  }

  .choosepeopleFollow_fd0_0_c0_c0 {
    font-size: 36rpx;
    color: #333;
  }

  .choosepeopleFollow_fd0_0_c0 {
    width: 120rpx;
  }

  .choosepeopleFollow_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .choosepeopleFollow_flex_1 {
    padding: 24rpx 32rpx 0rpx 32rpx;
  }

  .choosepeopleFollow_fd1_0_c0 {
    width: 24rpx;
    height: 24rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
    margin: 0rpx 16rpx 0rpx 0rpx;
  }

  .choosepeopleFollow_fd1_0 {
    background: rgba(248, 248, 248, 1);
    border-radius: 50rpx;
    background-size: 100% auto;
    padding: 24rpx 32rpx 24rpx 32rpx;
  }

  .choosepeopleFollow_flex_2 {
    margin: 8rpx 0rpx 0rpx 0rpx;
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .choosepeopleFollow_fd2_0_c0_c1 {
    width: 36rpx;
    height: 36rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
  }

  .choosepeopleFollow_fd2_0_c0_c0_c1_c1_c2 {
    color: #999999;
    font-size: 24rpx;
    font-weight: 400;
    line-height: 32rpx;
    margin: 0rpx 0rpx 0rpx 22rpx;
  }

  .choosepeopleFollow_fd2_0_c0_c0_c1_c1_c0 {
    color: #999999;
    font-size: 24rpx;
    font-weight: 400;
    line-height: 32rpx;
  }

  .choosepeopleFollow_fd2_0_c0_c0_c1_c1 {
    margin: 8rpx 0rpx 0rpx 0rpx;
  }

  .choosepeopleFollow_fd2_0_c0_c0_c1_c0 {
    color: #333333;
    font-size: 32rpx;
    font-weight: 700;
    line-height: 42rpx;
  }

  .choosepeopleFollow_fd2_0_c0_c0_c0 {
    width: 88rpx;
    height: 88rpx;
    border-radius: 50%;
    margin: 0rpx 20rpx 0rpx 0rpx;
  }

  .choosepeopleFollow_fd2_0_c0 {
    border-bottom: 1px solid #eee;
    padding: 32rpx 0rpx 32rpx 0rpx;
  }

  .choosepeopleFollow_flex_3 {
    background: #FFFFFF;
    width: 750rpx;
    // height: 112rpx;
    overflow: hidden;
    z-index: 10;
    bottom: calc(0rpx + var(--window-bottom));
    padding: 30rpx 0 40rpx 0;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
    box-shadow: 0rpx -1rpx 0rpx 1rpx rgba(0, 0, 0, 0.08);
  }

  .choosepeopleFollow_fd3_0_c0 {
    background: rgba(100, 80, 235, 1);
    border-radius: 44rpx;
    width: 686rpx;
    line-height: 88rpx;
    font-size: 32rpx;
    color: #fff;
  }

  .choosepeopleFollow_flex_4 {
    background: rgba(255, 255, 255, 1);
    background-size: 100% auto;
    border-radius: 16rpx;
  }

  .choosepeopleFollow_fd4_0_c1_c0 {
    color: #6450EB;
    font-size: 32rpx;
    font-weight: 700;
    line-height: 32rpx;
  }

  .choosepeopleFollow_fd4_0_c1 {
    border-top: 1px solid #eee;
    margin: auto 0rpx 0rpx 0rpx;
    padding: 32rpx 0rpx 32rpx 0rpx;
  }

  .choosepeopleFollow_fd4_0_c0_c2 {
    color: #999999;
    font-size: 24rpx;
    font-weight: 400;
    line-height: 24rpx;
    margin: 16rpx 0rpx 0rpx 0rpx;
  }

  .choosepeopleFollow_fd4_0_c0_c1 {
    color: #333333;
    font-size: 32rpx;
    font-weight: 700;
    line-height: 52rpx;
    margin: 10rpx 0rpx 0rpx 0rpx;
  }

  .choosepeopleFollow_fd4_0_c0_c0 {
    width: 180rpx;
    height: 180rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
  }

  .choosepeopleFollow_fd4_0_c0 {
    padding: 32rpx 0rpx 0rpx 0rpx;
  }

  .choosepeopleFollow_fd4_0 {
    height: 467rpx;
    width: 540rpx;
    border-radius: 16rpx;
  }
</style>
